package com.ruoyi.custom.domain;

import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 股票持仓对象 stock_portfolio
 * 
 * @author ruoyi
 * @date 2025-02-04
 */
public class StockPortfolio extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键ID */
    private Long id;

    /** 代码 */
    @Excel(name = "代码")
    private String code;

    /** 名称 */
    @Excel(name = "名称")
    private String name;

    /** 现价 */
    @Excel(name = "现价")
    private BigDecimal currentPrice;

    /** 涨跌 */
    @Excel(name = "涨跌")
    private BigDecimal priceChange;

    /** 市值 */
    @Excel(name = "市值")
    private BigDecimal marketValue;

    /** 持仓 */
    @Excel(name = "持仓")
    private BigDecimal position;

    /** 摊薄 */
    @Excel(name = "摊薄")
    private BigDecimal diluted;

    /** 成本 */
    @Excel(name = "成本")
    private BigDecimal cost;

    /** 盈亏 */
    @Excel(name = "盈亏")
    private BigDecimal profitLoss;

    /** 百分比 */
    @Excel(name = "百分比")
    private BigDecimal percentage;

    /** 创建时间 */
    private Date createdAt;

    /** 更新时间 */
    private Date updatedAt;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setCode(String code) 
    {
        this.code = code;
    }

    public String getCode() 
    {
        return code;
    }
    public void setName(String name) 
    {
        this.name = name;
    }

    public String getName() 
    {
        return name;
    }
    public void setCurrentPrice(BigDecimal currentPrice) 
    {
        this.currentPrice = currentPrice;
    }

    public BigDecimal getCurrentPrice() 
    {
        return currentPrice;
    }
    public void setPriceChange(BigDecimal priceChange) 
    {
        this.priceChange = priceChange;
    }

    public BigDecimal getPriceChange() 
    {
        return priceChange;
    }
    public void setMarketValue(BigDecimal marketValue) 
    {
        this.marketValue = marketValue;
    }

    public BigDecimal getMarketValue() 
    {
        return marketValue;
    }
    public void setPosition(BigDecimal position) 
    {
        this.position = position;
    }

    public BigDecimal getPosition() 
    {
        return position;
    }
    public void setDiluted(BigDecimal diluted) 
    {
        this.diluted = diluted;
    }

    public BigDecimal getDiluted() 
    {
        return diluted;
    }
    public void setCost(BigDecimal cost) 
    {
        this.cost = cost;
    }

    public BigDecimal getCost() 
    {
        return cost;
    }
    public void setProfitLoss(BigDecimal profitLoss) 
    {
        this.profitLoss = profitLoss;
    }

    public BigDecimal getProfitLoss() 
    {
        return profitLoss;
    }
    public void setPercentage(BigDecimal percentage) 
    {
        this.percentage = percentage;
    }

    public BigDecimal getPercentage() 
    {
        return percentage;
    }
    public void setCreatedAt(Date createdAt) 
    {
        this.createdAt = createdAt;
    }

    public Date getCreatedAt() 
    {
        return createdAt;
    }
    public void setUpdatedAt(Date updatedAt) 
    {
        this.updatedAt = updatedAt;
    }

    public Date getUpdatedAt() 
    {
        return updatedAt;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("code", getCode())
            .append("name", getName())
            .append("currentPrice", getCurrentPrice())
            .append("priceChange", getPriceChange())
            .append("marketValue", getMarketValue())
            .append("position", getPosition())
            .append("diluted", getDiluted())
            .append("cost", getCost())
            .append("profitLoss", getProfitLoss())
            .append("percentage", getPercentage())
            .append("createdAt", getCreatedAt())
            .append("updatedAt", getUpdatedAt())
            .toString();
    }
}
